<template>
  <div>
    <el-button v-print="'#print_demo'">打印</el-button>
    <div id="print_demo">
      <div class="header-box">头部</div>
      <div class="center-box">内容</div>
      <div class="footer-box">底部</div>
    </div>
  </div>
</template>

<script>
export default {
  name: '',
  components: {},
  data() {
    return {
      printObj: {
        id: 'print_demo',
        popTitle: '打印的标题',
        extraCss: 'https://www.google.com,https://www.google.com',
        extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>'
      }
    };
  },
  computed: {},
  watch: {},
  mounted: {},
  created() { },
  methods: {
  }
}

</script>
<style lang='scss' scoped>
#print_demo {
  .header-box {
    text-align: center;
    font-size: 30px;
    font-weight: 800;
  }
  .footer-box {
    color: #666;
  }
}
</style>
